3.1117 \(\int \frac{(c+d \tan (e+f x))^{5/2}}{(a+i a \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=217 \[ \frac{\sqrt{c+i d} \left (2 i c^2+6 c d-7 i d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c+i d}}\right )}{8 a^2 f}+\frac{(c+i d) (5 d+2 i c) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}-\frac{i (c-i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c-i d}}\right )}{4 a^2 f}+\frac{(-d+i c) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2} \]

[Out]

((-I/4)*(c - I*d)^(5/2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(a^2*f) + (Sqrt[c + I*d]*((2*I)*c^2 +
 6*c*d - (7*I)*d^2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]])/(8*a^2*f) + ((c + I*d)*((2*I)*c + 5*d)*Sq
rt[c + d*Tan[e + f*x]])/(8*a^2*f*(1 + I*Tan[e + f*x])) + ((I*c - d)*(c + d*Tan[e + f*x])^(3/2))/(4*f*(a + I*a*
Tan[e + f*x])^2)

________________________________________________________________________________________

Rubi [A]  time = 0.637724, antiderivative size = 217, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3558, 3595, 3539, 3537, 63, 208} \[ \frac{\sqrt{c+i d} \left (2 i c^2+6 c d-7 i d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c+i d}}\right )}{8 a^2 f}+\frac{(c+i d) (5 d+2 i c) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}-\frac{i (c-i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c-i d}}\right )}{4 a^2 f}+\frac{(-d+i c) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*Tan[e + f*x])^(5/2)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

((-I/4)*(c - I*d)^(5/2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(a^2*f) + (Sqrt[c + I*d]*((2*I)*c^2 +
 6*c*d - (7*I)*d^2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]])/(8*a^2*f) + ((c + I*d)*((2*I)*c + 5*d)*Sq
rt[c + d*Tan[e + f*x]])/(8*a^2*f*(1 + I*Tan[e + f*x])) + ((I*c - d)*(c + d*Tan[e + f*x])^(3/2))/(4*f*(a + I*a*
Tan[e + f*x])^2)

Rule 3558

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Si
mp[((b*c - a*d)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n - 1))/(2*a*f*m), x] + Dist[1/(2*a^2*m), Int[(a
+ b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 2)*Simp[c*(a*c*m + b*d*(n - 1)) - d*(b*c*m + a*d*(n - 1))
- d*(b*d*(m - n + 1) - a*c*(m + n - 1))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c -
a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, 0] && GtQ[n, 1] && (IntegerQ[m] || IntegersQ[2*m,
2*n])

Rule 3595

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[((A*b - a*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n)/(2*a*f*
m), x] + Dist[1/(2*a^2*m), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1)*Simp[A*(a*c*m + b*d*n
) - B*(b*c*m + a*d*n) - d*(b*B*(m - n) - a*A*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A,
B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && GtQ[n, 0]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(c+d \tan (e+f x))^{5/2}}{(a+i a \tan (e+f x))^2} \, dx &=\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}-\frac{\int \frac{\sqrt{c+d \tan (e+f x)} \left (-\frac{1}{2} a \left (4 c^2-7 i c d+3 d^2\right )-\frac{1}{2} a (c-7 i d) d \tan (e+f x)\right )}{a+i a \tan (e+f x)} \, dx}{4 a^2}\\ &=\frac{(c+i d) (2 i c+5 d) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}+\frac{\int \frac{\frac{1}{2} a^2 \left (4 c^3-10 i c^2 d-7 c d^2-5 i d^3\right )+\frac{1}{2} a^2 d \left (2 c^2-5 i c d-9 d^2\right ) \tan (e+f x)}{\sqrt{c+d \tan (e+f x)}} \, dx}{8 a^4}\\ &=\frac{(c+i d) (2 i c+5 d) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}+\frac{(c-i d)^3 \int \frac{1+i \tan (e+f x)}{\sqrt{c+d \tan (e+f x)}} \, dx}{8 a^2}+\frac{\left ((c+i d) \left (2 c^2-6 i c d-7 d^2\right )\right ) \int \frac{1-i \tan (e+f x)}{\sqrt{c+d \tan (e+f x)}} \, dx}{16 a^2}\\ &=\frac{(c+i d) (2 i c+5 d) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}-\frac{(i c+d)^3 \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{c-i d x}} \, dx,x,i \tan (e+f x)\right )}{8 a^2 f}-\frac{\left ((c+i d) \left (2 i c^2+6 c d-7 i d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{16 a^2 f}\\ &=\frac{(c+i d) (2 i c+5 d) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}-\frac{(c-i d)^3 \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i c}{d}+\frac{i x^2}{d}} \, dx,x,\sqrt{c+d \tan (e+f x)}\right )}{4 a^2 d f}-\frac{\left ((c+i d) \left (2 c^2-6 i c d-7 d^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i c}{d}-\frac{i x^2}{d}} \, dx,x,\sqrt{c+d \tan (e+f x)}\right )}{8 a^2 d f}\\ &=-\frac{i (c-i d)^{5/2} \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c-i d}}\right )}{4 a^2 f}+\frac{\sqrt{c+i d} \left (2 i c^2+6 c d-7 i d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{c+i d}}\right )}{8 a^2 f}+\frac{(c+i d) (2 i c+5 d) \sqrt{c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac{(i c-d) (c+d \tan (e+f x))^{3/2}}{4 f (a+i a \tan (e+f x))^2}\\ \end{align*}

Mathematica [A]  time = 1.84282, size = 291, normalized size = 1.34 \[ \frac{\sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (\frac{2 (\cos (2 e)+i \sin (2 e)) \left (-i \sqrt{-c+i d} \left (-4 i c^2 d+2 c^3-c d^2-7 i d^3\right ) \tan ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{-c-i d}}\right )-2 \sqrt{-c-i d} (d+i c)^3 \tan ^{-1}\left (\frac{\sqrt{c+d \tan (e+f x)}}{\sqrt{-c+i d}}\right )\right )}{\sqrt{-c-i d} \sqrt{-c+i d}}+2 (c+i d) \cos (e+f x) (\cos (2 f x)-i \sin (2 f x)) \sqrt{c+d \tan (e+f x)} ((-2 c+7 i d) \sin (e+f x)+(5 d+4 i c) \cos (e+f x))\right )}{16 f (a+i a \tan (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Tan[e + f*x])^(5/2)/(a + I*a*Tan[e + f*x])^2,x]

[Out]

(Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*((2*((-I)*Sqrt[-c + I*d]*(2*c^3 - (4*I)*c^2*d - c*d^2 - (7*I)*d^3)*A
rcTan[Sqrt[c + d*Tan[e + f*x]]/Sqrt[-c - I*d]] - 2*Sqrt[-c - I*d]*(I*c + d)^3*ArcTan[Sqrt[c + d*Tan[e + f*x]]/
Sqrt[-c + I*d]])*(Cos[2*e] + I*Sin[2*e]))/(Sqrt[-c - I*d]*Sqrt[-c + I*d]) + 2*(c + I*d)*Cos[e + f*x]*(Cos[2*f*
x] - I*Sin[2*f*x])*(((4*I)*c + 5*d)*Cos[e + f*x] + (-2*c + (7*I)*d)*Sin[e + f*x])*Sqrt[c + d*Tan[e + f*x]]))/(
16*f*(a + I*a*Tan[e + f*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.059, size = 978, normalized size = 4.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*tan(f*x+e))^(5/2)/(a+I*a*tan(f*x+e))^2,x)

[Out]

5/8*I/f/a^2*d^6/(-I*d+d*tan(f*x+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^(1/2))*c^2+7/8/f/a^2*d^5/(-d^2+2*I*c*d+c^2)/(-I*d-c)^(1/2)*arctan((c+d*tan(f*x+e))^(1/2)/(-I*d-c)^(1
/2))-11/4*I/f/a^2*d^4/(-I*d+d*tan(f*x+e))^2/(-d^2+2*I*c*d+c^2)*(c+d*tan(f*x+e))^(1/2)*c^2-1/4*I/f/a^2*(I*d-c)^
(5/2)*arctan((c+d*tan(f*x+e))^(1/2)/(I*d-c)^(1/2))-1/8*I/f/a^2*d^2/(-I*d+d*tan(f*x+e))^2/(-d^2+2*I*c*d+c^2)*(c
+d*tan(f*x+e))^(3/2)*c^3

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 4.02061, size = 2763, normalized size = 12.73 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/32*(2*a^2*f*sqrt(-(c^5 - 5*I*c^4*d - 10*c^3*d^2 + 10*I*c^2*d^3 + 5*c*d^4 - I*d^5)/(a^4*f^2))*e^(4*I*f*x + 4
*I*e)*log(1/4*(8*c^3 - 16*I*c^2*d - 8*c*d^2 - (8*I*a^2*f*e^(2*I*f*x + 2*I*e) + 8*I*a^2*f)*sqrt(((c - I*d)*e^(2
*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(c^5 - 5*I*c^4*d - 10*c^3*d^2 + 10*I*c^2*d^3 + 5*c
*d^4 - I*d^5)/(a^4*f^2)) + 4*(2*c^3 - 6*I*c^2*d - 6*c*d^2 + 2*I*d^3)*e^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*d - I*c*d^2 + 7*d^3 - (a^2*f*
e^(2*I*f*x + 2*I*e) + a^2*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(
4*c^5 - 20*I*c^4*d - 40*c^3*d^2 + 20*I*c^2*d^3 - 35*c*d^4 + 49*I*d^5)/(a^4*f^2)) + (2*I*c^3 + 6*c^2*d - 7*I*c*
d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(a^2*f)) - 2*(I*c^2 - 2*c*d - I*d^2 + (3*I*c^2 + 3*c*d + 6*I*d^
2)*e^(4*I*f*x + 4*I*e) + (4*I*c^2 + c*d + 5*I*d^2)*e^(2*I*f*x + 2*I*e))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) +
c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-4*I*f*x - 4*I*e)/(a^2*f)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))**(5/2)/(a+I*a*tan(f*x+e))**2,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [B]  time = 1.66116, size = 707, normalized size = 3.26 \begin{align*} \frac{1}{8} \, d^{3}{\left (\frac{2 \, \sqrt{2}{\left (c^{3} - 3 i \, c^{2} d - 3 \, c d^{2} + i \, d^{3}\right )} \arctan \left (\frac{-16 i \, \sqrt{d \tan \left (f x + e\right ) + c} c - 16 i \, \sqrt{c^{2} + d^{2}} \sqrt{d \tan \left (f x + e\right ) + c}}{8 \, \sqrt{2} \sqrt{c + \sqrt{c^{2} + d^{2}}} c - 8 i \, \sqrt{2} \sqrt{c + \sqrt{c^{2} + d^{2}}} d + 8 \, \sqrt{2} \sqrt{c^{2} + d^{2}} \sqrt{c + \sqrt{c^{2} + d^{2}}}}\right )}{a^{2} \sqrt{c + \sqrt{c^{2} + d^{2}}} d^{3} f{\left (-\frac{i \, d}{c + \sqrt{c^{2} + d^{2}}} + 1\right )}} + \frac{4 \,{\left (-2 i \, c^{3} - 4 \, c^{2} d + i \, c d^{2} - 7 \, d^{3}\right )} \arctan \left (\frac{4 \,{\left (\sqrt{d \tan \left (f x + e\right ) + c} c - \sqrt{c^{2} + d^{2}} \sqrt{d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt{-8 \, c + 8 \, \sqrt{c^{2} + d^{2}}} + i \, \sqrt{-8 \, c + 8 \, \sqrt{c^{2} + d^{2}}} d - \sqrt{c^{2} + d^{2}} \sqrt{-8 \, c + 8 \, \sqrt{c^{2} + d^{2}}}}\right )}{a^{2} \sqrt{-8 \, c + 8 \, \sqrt{c^{2} + d^{2}}} d^{3} f{\left (\frac{i \, d}{c - \sqrt{c^{2} + d^{2}}} + 1\right )}} + \frac{2 \,{\left (d \tan \left (f x + e\right ) + c\right )}^{\frac{3}{2}} c^{2} - 2 \, \sqrt{d \tan \left (f x + e\right ) + c} c^{3} - 5 i \,{\left (d \tan \left (f x + e\right ) + c\right )}^{\frac{3}{2}} c d + i \, \sqrt{d \tan \left (f x + e\right ) + c} c^{2} d + 7 \,{\left (d \tan \left (f x + e\right ) + c\right )}^{\frac{3}{2}} d^{2} - 8 \, \sqrt{d \tan \left (f x + e\right ) + c} c d^{2} - 5 i \, \sqrt{d \tan \left (f x + e\right ) + c} d^{3}}{{\left (d \tan \left (f x + e\right ) - i \, d\right )}^{2} a^{2} d^{2} f}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*tan(f*x+e))^(5/2)/(a+I*a*tan(f*x+e))^2,x, algorithm="giac")

[Out]

1/8*d^3*(2*sqrt(2)*(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)*arctan((-16*I*sqrt(d*tan(f*x + e) + c)*c - 16*I*sqrt(c^
2 + d^2)*sqrt(d*tan(f*x + e) + c))/(8*sqrt(2)*sqrt(c + sqrt(c^2 + d^2))*c - 8*I*sqrt(2)*sqrt(c + sqrt(c^2 + d^
2))*d + 8*sqrt(2)*sqrt(c^2 + d^2)*sqrt(c + sqrt(c^2 + d^2))))/(a^2*sqrt(c + sqrt(c^2 + d^2))*d^3*f*(-I*d/(c +
sqrt(c^2 + d^2)) + 1)) + 4*(-2*I*c^3 - 4*c^2*d + I*c*d^2 - 7*d^3)*arctan(4*(sqrt(d*tan(f*x + e) + c)*c - sqrt(
c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-8*c + 8*sqrt(c^2 + d^2)) + I*sqrt(-8*c + 8*sqrt(c^2 + d^2))*d -
sqrt(c^2 + d^2)*sqrt(-8*c + 8*sqrt(c^2 + d^2))))/(a^2*sqrt(-8*c + 8*sqrt(c^2 + d^2))*d^3*f*(I*d/(c - sqrt(c^2
+ d^2)) + 1)) + (2*(d*tan(f*x + e) + c)^(3/2)*c^2 - 2*sqrt(d*tan(f*x + e) + c)*c^3 - 5*I*(d*tan(f*x + e) + c)^
(3/2)*c*d + I*sqrt(d*tan(f*x + e) + c)*c^2*d + 7*(d*tan(f*x + e) + c)^(3/2)*d^2 - 8*sqrt(d*tan(f*x + e) + c)*c
*d^2 - 5*I*sqrt(d*tan(f*x + e) + c)*d^3)/((d*tan(f*x + e) - I*d)^2*a^2*d^2*f))